<!DOCTYPE html>
<html lang="en" class="no-js">

<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>login</title>
    <link rel="stylesheet" type="text/css" href="../content/login/css/normalize.css" />
    <link rel="stylesheet" type="text/css" href="../content/login/css/demo.css" />
    <link rel="stylesheet" href="../content/login/css/jquery.jgrowl.min.css">
    <!--必要样式-->
    <link rel="stylesheet" type="text/css" href="../content/login/css/component.css" />
    <style>
        input::-webkit-input-placeholder{
		color:rgba(0, 0, 0, 0.726);
	}
	input::-moz-placeholder{   /* Mozilla Firefox 19+ */
		color:rgba(0, 0, 0, 0.726);
	}
	input:-moz-placeholder{    /* Mozilla Firefox 4 to 18 */
		color:rgba(0, 0, 0, 0.726);
	}
	input:-ms-input-placeholder{  /* Internet Explorer 10-11 */ 
		color:rgba(0, 0, 0, 0.726);
	}
</style>
</head>

<body  class="content-container">
    <div class="container demo-1">
        <div class="content">
            <div id="large-header" class="large-header">
                <canvas id="demo-canvas"></canvas>
                <div class="logo_box">
                    <h3>[ Psi+ 后台管理系统]</h3>
                    <form action="#" name="f" method="post">
                        <div class="input_outer">
                            <span class="u_user"></span>
                            <input id="ID" name="logname" class="text" style="color: #000000 !important" type="text"
                                placeholder="请输入账户">
                        </div>
                        <div class="input_outer">
                            <span class="us_uer"></span>
                            <input id="PASSWORD" name="logpass" class="text" style="color: #000000 !important; position:absolute; z-index:100;"
                                value="" type="password" placeholder="请输入密码">
                        </div>
                        <div id="LOGIN" class="mb2">
                            <a class="act-but submit" href="javascript:;" v-on:click="login()" style="color: #FFFFFF">登录</a>
                            </div>
                    </form>
                </div>
            </div>
        </div>
    </div><!-- /container -->
    <script src="../content/js/lib/vue/vue.min.js"></script>
    <script src="../content/login/js/TweenLite.min.js"></script>
    <script src="../content/login/js/EasePack.min.js"></script>
    <script src="../content/login/js/jquery.js"></script>
    <script src="../content/login/js/rAF.js"></script>
    <script src="../content/login/js/demo-1.js"></script>
    <script src="../content/login/js/jquery.jgrowl.min.js"></script>
    <!-- <script src="../content/login/js/Longin.js"></script> -->
    <div style="text-align:center;"></div>
    <script src="../content/js/common.js"></script>
    <script>
        var vmData = {};
        vmData = $.extend(vmData, baseData);
        var vmMothod = {
            init: function () {},
            login: function () {
                var username = document.getElementById("ID").value;
                var password = document.getElementById("PASSWORD").value;
                if (username == "") {
                    $.jGrowl("用户名不能为空！", {
                        header: '提醒'
                    });
                } else if (password == "") {
                    $.jGrowl("密码不能为空！", {
                        header: '提醒'
                    });
                } else {
                    var ajaxParam = {
                        url: 'user/login',
                        param: '{ "account": "admin","password": "admin"}',
                        async: false
                    }
                    vm.RequestPostAajx(ajaxParam, function (e) {
                        if (e != null && e.status == 200 && e.data && e.data.accessToken) {
                            localStorage.setItem("bearar ", e.data.accessToken);
                            window.location.href = "../../web/index.html";
                        } else {
                            $("#error").html("登录失败,请联系管理员");
                        }
                    });
                }

            },
        };
        vmMothod = $.extend(vmMothod, baseCommonFunction);
        var vm = new Vue({
            el: '.content-container',
            data: vmData,
            methods: vmMothod
        });
        vm.init();
    </script>
</body>

</html>